package br.com.tecnoria.util
{	
	import mx.collections.ArrayCollection;
	
	import spark.collections.Sort;
	import spark.collections.SortField;
	import spark.formatters.NumberFormatter;

	public class Util
	{
		[Bindable]
		public static var dataproviderStates:ArrayCollection = new ArrayCollection([
			{data: "AC", label: "AC"},{data: "AL", label: "AL"},{data: "AP", label: "AP"},{data: "AM", label: "AM"},{data: "BA", label: "BA"},{data: "CE", label: "CE"},
			{data: "DF", label: "DF"},{data: "ES", label: "ES"},{data: "GO", label: "GO"},{data: "MA", label: "MA"},{data: "MG", label: "MG"},{data: "MT", label: "MT"},
			{data: "MS", label: "MS"},{data: "PA", label: "PA"},{data: "PB", label: "PB"},{data: "PR", label: "PR"},{data: "PE", label: "PE"},{data: "PI", label: "PI"},
			{data: "RJ", label: "RJ"},{data: "RN", label: "RN"},{data: "RS", label: "RS"},{data: "RO", label: "RO"},{data: "RR", label: "RR"},{data: "SC", label: "SC"},
			{data: "SP", label: "SP"},{data: "SE", label: "SE"},{data: "TO", label: "TO"}]);
		
		
		public static function formatNumber(number:Object):String
		{
			var formatter:NumberFormatter = new NumberFormatter();
			formatter.setStyle("locale", "pt-BR");
			return formatter.format(number);
		}
		
		/*public static function sortArray(data:String, arrColl:ArrayCollection):ArrayCollection
		{
			var sortField:Sort = new Sort();
			sortField.name = data;
			
			arrColl = sortField;
			arrColl.refresh();
			
			return arrColl;
		}*/
	}
}